﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DemandReport.aspx.cs" Inherits="iEN.Report.DemandReport" MaintainScrollPositionOnPostback="true" EnableEventValidation="false"%>
<%@ Register src="../UserControl/TopMenu.ascx" tagname="TopMenu" tagprefix="uc2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 9%;
        }
        .style6
        {
            width: 9%;
            height: 28px;
        }
        .style7
        {
            width: 100%;
            height: 28px;
        }
        </style>
</head>
<body>
    <form id="form1" runat="server">
    <center>
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true">
        </asp:ScriptManager>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate >
    <table  style="width: 952px">  
        <tr>
            <td><uc2:TopMenu ID="TopMenu1" runat="server" /></td>                
        </tr>
        <tr>
            <td style="background-image:url('../images/title_back.gif')" align="center" ; 
                width="952px" >
                <asp:Label ID="Label1" runat="server" Text="用 電 需 量 報 表" 
                    BackColor="Transparent" Font-Names="標楷體" Font-Size="XX-Large" 
                    ForeColor="Blue"></asp:Label>
            </td>              
        </tr>
        <tr>
            <td align="center" valign="middle" width="100%">
            <asp:Panel ID="Panel3" runat="server" GroupingText="報表設定" BackColor="Transparent" 
                    Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="16px" ForeColor="Black" 
                    style="width: 100%" HorizontalAlign="Left">
                <table align="left" ; width="100%">
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label4" runat="server" ForeColor="Black" Text="大　　樓：" 
                                Font-Size="Medium"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlBuilding" runat="server" AutoPostBack="True" 
                                CssClass="normal" Font-Size="Medium" 
                                onselectedindexchanged="ddlBuilding_SelectedIndexChanged">
                            </asp:DropDownList> 
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label3" runat="server" ForeColor="Black" Text="樓　　層：" 
                                Font-Size="Medium"></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:DropDownList ID="ddlFloor" runat="server" AutoPostBack="True" 
                                CssClass="normal" Font-Size="Medium" 
                                onselectedindexchanged="ddlFloor_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label6" runat="server" Font-Size="Medium" ForeColor="Black" 
                                Text="電　　錶："></asp:Label>
                        </td>
                        <td class="style1">
                            <asp:Panel ID="Panel5" runat="server">
                                <asp:CheckBox ID="selectAllBox" runat="server" 
                                    oncheckedchanged="selectAllBox_CheckedChanged" Text="全選" Visible="False" 
                                    AutoPostBack="True" />
                                <asp:Label ID="selectAllLabel" runat="server" Text="Label" Visible="False"></asp:Label>
                                <asp:CheckBoxList ID="eMeterList" runat="server" RepeatColumns="8" 
                                    RepeatDirection="Horizontal" AutoPostBack="True" 
                                    onselectedindexchanged="eMeterList_SelectedIndexChanged" CellPadding="0" 
                                    CellSpacing="0">
                                </asp:CheckBoxList>
                            </asp:Panel>
                       </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            <asp:Label ID="Label5" runat="server" ForeColor="Black" Text="查詢期間：" 
                                Font-Size="Medium"></asp:Label>
                        </td>
                        <td class="style7">
                            <asp:TextBox ID="tbBgnDate" runat="server" CssClass="normaltext"></asp:TextBox>
                            <cc1:CalendarExtender ID="tbBgnDate_CalendarExtender" runat="server" 
                                TargetControlID="tbBgnDate" Format="yyyy/MM/dd">
                            </cc1:CalendarExtender>
                            ～
                            <asp:TextBox ID="tbEndDate" runat="server" CssClass="normaltext"></asp:TextBox>
                            <cc1:CalendarExtender ID="tbEndDate_CalendarExtender" runat="server" 
                                TargetControlID="tbEndDate" Format="yyyy/MM/dd">
                            </cc1:CalendarExtender>
                            &nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnQuery" runat="server" onclick="btnQuery_Click" Text="查詢" />
                            <asp:Label ID="lblStatus" runat="server" ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                </table>          
            </asp:Panel>
            </td>
        </tr>
        <tr>
        <td align="center">
        <div id="Loading" 
                
                style="visibility:hidden; font-size: x-large; color: red; font-family: 標楷體;">
            報表產生中…請稍候…
        </div>
        </td>
        </tr>
                <tr>
                    <td align="left">
                        <asp:Panel ID="Panel1" runat="server" GroupingText="報表匯出" 
                            BackColor="Transparent" Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" 
                            Font-Size="16px" ForeColor="Black" Visible="False">
                            <asp:RadioButtonList ID="exportList" runat="server" 
                                RepeatDirection="Horizontal" CellPadding="5" CellSpacing="5" 
                                RepeatLayout="Flow">
                                <asp:ListItem>PDF</asp:ListItem>
                                <asp:ListItem>Tiff</asp:ListItem>
                                <asp:ListItem>HTML</asp:ListItem>
                                <asp:ListItem>Excel</asp:ListItem>
                            </asp:RadioButtonList>
                            &nbsp;&nbsp;
                            <asp:Button ID="btnExport" runat="server" Text="匯出" onclick="btnExport_Click" />
                        </asp:Panel>
                    </td>
                </tr>
                
                <tr>
                <td align="center">
                    
                    <asp:Panel ID="Panel4" runat="server" GroupingText="查詢結果" 
                        BackColor="Transparent" Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" 
                        Font-Size="16px" ForeColor="Black" Height="500px" Visible="False">
                        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
                            Font-Size="8pt" InteractiveDeviceInfos="(集合)" 
                            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Height="500px" 
                            Width="800px" Visible="False">
                            
                        </rsweb:ReportViewer>
                       
                    </asp:Panel>
            </td>
        </tr>
    </table>
    </ContentTemplate>
    </asp:UpdatePanel>
    </center>
    </form>
</body>
</html>
